using System;
using bitzhuwei.Compiler;

namespace bitzhuwei.GLSLFormat {
    /// <summary>
    /// Correspond to the Vn node assignment_operator in the grammar(GLSL).
    /// </summary>
    internal partial class Vnassignment_operator : IFullFormat {
        // [074] assignment_operator = '=' ;
        // [075] assignment_operator = '*=' ;
        // [076] assignment_operator = '/=' ;
        // [077] assignment_operator = '%=' ;
        // [078] assignment_operator = '+=' ;
        // [079] assignment_operator = '-=' ;
        // [080] assignment_operator = '<<=' ;
        // [081] assignment_operator = '>>=' ;
        // [082] assignment_operator = '&=' ;
        // [083] assignment_operator = '^=' ;
        // [084] assignment_operator = '|=' ;


        private readonly IFullFormat complex;

        private readonly TokenRange _scope;
        public TokenRange Scope => _scope;
        public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
            context.PrintBlanksAnd(this.complex, preConfig, writer);
        }


        // [074] assignment_operator = '=' ;
        public Vnassignment_operator(Token r0) {
            this.complex = new complex0(r0);
            this._scope = new TokenRange(r0);
        }
        class complex0 : IFullFormat {
            private readonly TokenRange _scope;
            public TokenRange Scope => _scope;
            public void FullFormat(BlankConfig? preConfig, TextWriter writer, FormatContext context) {
                context.PrintBlanksAnd(r0, preConfig, writer);
            }
            public readonly Token r0;
            public complex0(Token r0) {
                this.r0 = r0;
                this._scope = new TokenRange(r0);
            }
        }

        // [075] assignment_operator = '*=' ;
        // complex1 repeated with complex0

        // [076] assignment_operator = '/=' ;
        // complex2 repeated with complex0

        // [077] assignment_operator = '%=' ;
        // complex3 repeated with complex0

        // [078] assignment_operator = '+=' ;
        // complex4 repeated with complex0

        // [079] assignment_operator = '-=' ;
        // complex5 repeated with complex0

        // [080] assignment_operator = '<<=' ;
        // complex6 repeated with complex0

        // [081] assignment_operator = '>>=' ;
        // complex7 repeated with complex0

        // [082] assignment_operator = '&=' ;
        // complex8 repeated with complex0

        // [083] assignment_operator = '^=' ;
        // complex9 repeated with complex0

        // [084] assignment_operator = '|=' ;
        // complex10 repeated with complex0



    }
}
